package com.foreveross.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

/**
 * FunMenu entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "fun_menu", catalog = "hrtenement")
public class FunMenu implements java.io.Serializable {

	// Fields

	private String id;
	private HrHouses hrHouses;
	private String name;
	private String url;
	private String parentId;

	// Constructors

	/** default constructor */
	public FunMenu() {
	}

	/** minimal constructor */
	public FunMenu(String id) {
		this.id = id;
	}

	/** full constructor */
	public FunMenu(String id, HrHouses hrHouses, String name, String url,
			String parentId) {
		this.id = id;
		this.hrHouses = hrHouses;
		this.name = name;
		this.url = url;
		this.parentId = parentId;
	}

	// Property accessors
	@Id
	@GenericGenerator(name="idGenerator", strategy="uuid")
	@GeneratedValue(generator="idGenerator") 
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "house_id")
	@NotFound(action=NotFoundAction.IGNORE)
	public HrHouses getHrHouses() {
		return this.hrHouses;
	}

	public void setHrHouses(HrHouses hrHouses) {
		this.hrHouses = hrHouses;
	}

	@Column(name = "name")
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "url")
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Column(name = "parentId")
	public String getParentId() {
		return this.parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

}